<template>
    <div class="home-content" @mousemove="dragLeftMove" @mouseup="dragLeftEnd" @mouseleave="dragLeftEnd">
        <div class="home-content-head">
            <vhead :navList='navLists'></vhead>
        </div>
    </div>
</template>
<script>
// import VueRouter from 'vue-router';
// import mains from './mains.vue';
// import resourceContent from './resourceContent';
// import leftTree from './leftTree';
// import leftMainList from './commons/leftmainlist/leftmainlist';
// import vhead from './head';
// import recentTask from './system/recentTask.vue';
// import siteScreem from './system/popup/siteScreen';
// import bigScreen from './bigScreen';
export default {
    name: 'homes',
    data () {
        return {
            navLists: [
                {text: '主页', link: '/homes/mains'},
                {text: '虚拟机', link: '/homes/vms'},
                {text: '计算池', link: '/homes/hosts'},
                {text: '存储池', link: '/homes/storages'},
                {text: '裸金属', link: '/homes/bare'}
            ],
            layoutX: '210',
            layoutY: '0',
            ragTaskTop: '0',
            layoutOldY: '',
            layoutYPx: '180',
            showLayouthMask: false,
            threeNode: null,
            isSlideIn: false,
            isTaskSlideIn: true,
            showLayoutyMask: false,
            isMainPart: function () {
                return location.hash.split('/')[2] === 'mains';
            },
            marginLeftDistabce: '0px',
            centerDivWidth: 'calc(100%-210px)',
            proxyhLeft: '210px',
            proxyhOpacity: '0',
            proxyLeftPx: '208px',
            taskOp: 0,
            curListNode: null,
            showSiteScreen: false,
            centerViewKey: this.$store.state.id
        }
    },
    computed: {
        showTreeFlag () {
            let curPageIndex;
            this.navLists.forEach((liItem, index) => {
                if (liItem.link.indexOf(this.$store.state.mainPart) > -1) {
                    curPageIndex = index;
                }
            });
            if (curPageIndex !== 0 && this.curListNode && this.curListNode.showLeftTree && this.curListNode.href.indexOf(this.$store.mainPart) > -1) {
                return true;
            }
            if (this.$store.state.mainPart === 'tags') {
                return true;
            }
            return curPageIndex;
        },
        showBigScreen () {
            return this.$store.state.showBigScreen;
        }
    },
    watch: {}
}
</script>
<style lang="stylus">

</style>
